#include"Seg.h"
unsigned char Location_Select[6]={0xFE,0xFD,0xFB,0xF7,0xEF,0xDF};//数码管位置选择，参数范围为1-6
unsigned char Num_Select[18]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x00,0x77,0x6D,0x77,0x40,0x3E,0x73,0x64};//数码管显示内容选择，参数范围为0-10

void Seg_Serve(unsigned char weila,dula,point)
{
	/*段选清零*/
		P0=0x00;
		P2_6=1;
		P2_6=0;

	/*位选*/
	P0=Location_Select[weila];
		P2_7=1;
		P2_7=0;

		/*段选*/
	if(point==1)
	{
		P0=Num_Select[dula]|0x80;
		P2_6=1;
		P2_6=0;
	}
else
{
		P0=Num_Select[dula];
		P2_6=1;
		P2_6=0;

}

}

